/*=======================================================================================
	ACS.do

		Computes houshold before-tax income distribution in Alaska using 5-year
		ACS 2010-2014

	Author: Lorenz Kueng, August 2017
=========================================================================================*/

cap log close PFW_03b
log using "$homedir/log-files/PFW_03b_$date.log", text replace name(PFW_03b)


use "$homedir/data/stata/ACS-5y_2010-2014_household-income-by-state.dta", clear 
	
	** Select Alaska
		keep if statefip == 2 

	
	** Summary stats
		sum hhincome, d
	
	
	** Create income percentiles
	
		* Quintiles
		cap drop hhincome_pctile
		egen hhincome_pctile = xtile(hhincome), n(5)
		tabstat hhincome, statistics(mean median sd N min max) columns(statistics) noseparator by(hhincome_pctile) 
	
		* Deciles
		cap drop hhincome_pctile
		egen hhincome_pctile = xtile(hhincome), n(10)
		tabstat hhincome, statistics(mean median sd N min max) columns(statistics) noseparator by(hhincome_pctile) 

log close PFW_03b
